package com.hjqjl.whdemo.feature.feature0.ui.activity.custom;

import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.hjqjl.whdemo.base.BaseActivity;
import com.hjqjl.whdemo.databinding.ActivityCustomControlBinding;

/**
 * 自定义控件界面
 */
public class CustomControlActivity extends BaseActivity {
    public static void actionStart(Context context) {
        Intent intent = new Intent(context, CustomControlActivity.class);
        context.startActivity(intent);
    }

    private ActivityCustomControlBinding binding;

    @Override
    protected void initData() {
        binding = ActivityCustomControlBinding.inflate(getLayoutInflater());
        View view = binding.getRoot();
        setContentView(view);
    }

    @Override
    protected void processLogic() {
        binding.btnCustomControlCustomTitle.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CustomTitleActivity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlPaypwdkeyboard.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PayPwdKeyboardActivity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlNodeprogress.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                NodeProgressActivity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlGame2048.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Game2048Activity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlDialog.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DialogActivity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlDialogfragment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DialogFragmentActivity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlCountdown.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CountDownActivity.actionStart(pActivity);
            }
        });
        binding.btnCustomControlSidebar.setOnClickListener(v -> SidebarSlideActivity.start(pActivity));
    }
}
